home *** CD-ROM | disk | FTP | other *** search
- Path: atglab.bls.com!usenet
- From: yzbjbpj@news
- Newsgroups: comp.lang.c
- Subject: Re: [Help] I can't find my error.
- Date: Thu, 22 Feb 96 08:31:04 cst
- Organization: BellSouth ATG lab
- Message-ID: <NEWTNews.825000870.11791.yzbjbpj@a0004005.al.bst.bls.com>
- References: <4ggvgr$1b2@aurora.engr.LaTech.edu>
- NNTP-Posting-Host: bstfirewall.bst.bls.com
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage
-
-
- char name should probably be a character array, e.g. char name[20];
- Make sure the array is large enough to hold the longest name that
- will be input.
-
- By just declaring name as a char like you're doing, all
- that will be stored in name via scanf is the first letter typed in. Also,
- the rest of the name input may cause the int age variable to be overwritten.
- So, be sure to use an array for name.
-
- Brian
-
-